package javatest3.ForWhileTest.test4;

import java.util.Scanner;

public class method2 {
    public static void main(String[] args) {

        int a, b, c;
        for (int num = 100; num < 999; num++) {
            a = num / 100;//百位
            b = num / 10 % 10;//十位
            c = num % 10;//个位
            if ((a * a * a) + (b * b * b) + (c * c * c) == num) {
                System.out.println(num+"这个数是水仙花数");
            }
        }
    }
}
